\(\int \cot (c+d x) (a+a \sin (c+d x)) \, dx\) [192]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 17, antiderivative size = 24 \[ \int \cot (c+d x) (a+a \sin (c+d x)) \, dx=\frac {a \log (\sin (c+d x))}{d}+\frac {a \sin (c+d x)}{d} \]

[Out]

a*ln(sin(d*x+c))/d+a*sin(d*x+c)/d

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {2786, 45} \[ \int \cot (c+d x) (a+a \sin (c+d x)) \, dx=\frac {a \sin (c+d x)}{d}+\frac {a \log (\sin (c+d x))}{d} \]

[In]

Int[Cot[c + d*x]*(a + a*Sin[c + d*x]),x]

[Out]

(a*Log[Sin[c + d*x]])/d + (a*Sin[c + d*x])/d

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2786

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_.), x_Symbol] :> Dist[1/f, Subst[I
nt[x^p*((a + x)^(m - (p + 1)/2)/(a - x)^((p + 1)/2)), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& EqQ[a^2 - b^2, 0] && IntegerQ[(p + 1)/2]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {a+x}{x} \, dx,x,a \sin (c+d x)\right )}{d} \\ & = \frac {\text {Subst}\left (\int \left (1+\frac {a}{x}\right ) \, dx,x,a \sin (c+d x)\right )}{d} \\ & = \frac {a \log (\sin (c+d x))}{d}+\frac {a \sin (c+d x)}{d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.96 \[ \int \cot (c+d x) (a+a \sin (c+d x)) \, dx=\frac {a \log (\cos (c+d x))}{d}+\frac {a \log (\tan (c+d x))}{d}+\frac {a \cos (d x) \sin (c)}{d}+\frac {a \cos (c) \sin (d x)}{d} \]

[In]

Integrate[Cot[c + d*x]*(a + a*Sin[c + d*x]),x]

[Out]

(a*Log[Cos[c + d*x]])/d + (a*Log[Tan[c + d*x]])/d + (a*Cos[d*x]*Sin[c])/d + (a*Cos[c]*Sin[d*x])/d

Maple [A] (verified)

Time = 0.10 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.04

method result size
derivativedivides \(-\frac {a \left (\ln \left (\csc \left (d x +c \right )\right )-\frac {1}{\csc \left (d x +c \right )}\right )}{d}\) \(25\)
default \(-\frac {a \left (\ln \left (\csc \left (d x +c \right )\right )-\frac {1}{\csc \left (d x +c \right )}\right )}{d}\) \(25\)
risch \(-i a x -\frac {2 i a c}{d}+\frac {a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d}+\frac {a \sin \left (d x +c \right )}{d}\) \(43\)

[In]

int(cos(d*x+c)*csc(d*x+c)*(a+a*sin(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

-1/d*a*(ln(csc(d*x+c))-1/csc(d*x+c))

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.00 \[ \int \cot (c+d x) (a+a \sin (c+d x)) \, dx=\frac {a \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) + a \sin \left (d x + c\right )}{d} \]

[In]

integrate(cos(d*x+c)*csc(d*x+c)*(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

(a*log(1/2*sin(d*x + c)) + a*sin(d*x + c))/d

Sympy [F]

\[ \int \cot (c+d x) (a+a \sin (c+d x)) \, dx=a \left (\int \cos {\left (c + d x \right )} \csc {\left (c + d x \right )}\, dx + \int \sin {\left (c + d x \right )} \cos {\left (c + d x \right )} \csc {\left (c + d x \right )}\, dx\right ) \]

[In]

integrate(cos(d*x+c)*csc(d*x+c)*(a+a*sin(d*x+c)),x)

[Out]

a*(Integral(cos(c + d*x)*csc(c + d*x), x) + Integral(sin(c + d*x)*cos(c + d*x)*csc(c + d*x), x))

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.92 \[ \int \cot (c+d x) (a+a \sin (c+d x)) \, dx=\frac {a \log \left (\sin \left (d x + c\right )\right ) + a \sin \left (d x + c\right )}{d} \]

[In]

integrate(cos(d*x+c)*csc(d*x+c)*(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

(a*log(sin(d*x + c)) + a*sin(d*x + c))/d

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.96 \[ \int \cot (c+d x) (a+a \sin (c+d x)) \, dx=\frac {a \log \left ({\left | \sin \left (d x + c\right ) \right |}\right ) + a \sin \left (d x + c\right )}{d} \]

[In]

integrate(cos(d*x+c)*csc(d*x+c)*(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

(a*log(abs(sin(d*x + c))) + a*sin(d*x + c))/d

Mupad [B] (verification not implemented)

Time = 8.88 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.58 \[ \int \cot (c+d x) (a+a \sin (c+d x)) \, dx=\frac {a\,\left (\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )+\sin \left (c+d\,x\right )-\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )\right )}{d} \]

[In]

int((cos(c + d*x)*(a + a*sin(c + d*x)))/sin(c + d*x),x)

[Out]

(a*(log(tan(c/2 + (d*x)/2)) + sin(c + d*x) - log(tan(c/2 + (d*x)/2)^2 + 1)))/d